package com.heima.media.controller;


import com.heima.common.dto.ResponseResult;
import com.heima.media.dto.LoginDto;
import com.heima.media.service.IWmUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 管理员用户信息表 前端控制器
 * </p>
 *
 * @author Wq
 * @since 2022-09-30
 */
@RestController
@RequestMapping("/login")
@Api(tags = "管理员登录API")
public class LoginController {

    @Autowired
    private IWmUserService wmUserService;

    @PostMapping("/in")
    @ApiOperation(value = "自媒体登录")
    @ApiImplicitParam(name = "dto", value = "LoginDto", required = true)
    public ResponseResult login(@RequestBody LoginDto dto){
        return wmUserService.login(dto);
    }
}
